package cn.shujuhai.qtadmin.platform.domain;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import cn.shujuhai.qtadmin.platform.pluging.logging.BusinessType;
import cn.shujuhai.qtadmin.platform.pluging.logging.LoggingType;
import cn.shujuhai.qtadmin.platform.pluging.logging.RequestMethod;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author DCH TableName sys_logging
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_logging")
@Data
public class SysLogging extends Model<SysLogging> implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 相应消息体
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;
    /**
     * 请求方式
     */
    @TableField(value = "method")
    private String method;
    /**
     * 业务类型
     */
    @TableField(value = "business_type")
    private BusinessType businessType;
    /**
     * 请求方法
     */
    @TableField(value = "request_method")
    private RequestMethod requestMethod;
    /**
     * 操作人
     */
    @TableField(value = "operate_name")
    private String operateName;
    /**
     * 操作路径
     */
    @TableField(value = "operate_url")
    private String operateUrl;
    /**
     * 操作地址
     */
    @TableField(value = "operate_address")
    private String operateAddress;
    /**
     * 请求参数
     */
    @TableField(value = "request_param")
    private String requestParam;
    /**
     * 相应消息体
     */
    @TableField(value = "response_body")
    private String responseBody;
    /**
     * 是否成功
     */
    @TableField(value = "success")
    private boolean success;
    /**
     * 异常信息
     */
    @TableField(value = "error_msg")
    private String errorMsg;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;
    /**
     * 描述
     */
    @TableField(value = "description")
    private String description;
    /**
     * 请求消息体
     */
    @TableField(value = "request_body")
    private String requestBody;
    /**
     * 使用浏览器
     */
    @TableField(value = "browser")
    private String browser;
    /**
     * 操作系统
     */
    @TableField(value = "system_os")
    private String systemOs;
    /**
     * 日志类型，登录日志，操作日志
     */
    @TableField(value = "logging_type")
    private LoggingType loggingType;
}